<?php

if(!empty($_POST))
{
	$id = $_POST['Id'];
	$file = upload($_FILES['file']);
	$waterstr = $_POST['text'];
	$size = $_POST['text_size'];
	$watertext = waterstr($file,$waterstr,$size);
	$_POST['file'] = $watertext;
	$ree = update('watertext', $_POST, $id);
	if($ree)
	{
		echo '修改成功';
		header('Refresh:1;index.php?a=admin&b=watertext&c=index');
		die;
	}
	else
	{
		echo '修改失败';
		header('Refresh:1;index.php?a=admin&b=watertext&c=index');
		die;
	}	
}
$id = $_GET['id'];
$re = selectone('watertext','Id='.$id);


include('app/admin/watertext/html/update.html');
?>